package com.example.transaction.mapper;


import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.transaction.pojo.A;
import com.example.transaction.pojo.B;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BMapper {
    @Insert("insert into transaction_b(b_name,b_money) values(#{et.BName},#{et.BMoney})")
    public boolean insertB(@Param(Constants.ENTITY) B b);

    @Update("update transaction_b set b_money=#{BMoney} where b_name=#{BName}")
    public boolean updateBByName(@Param("BName") String name,@Param("BMoney") Integer money);

    @Select("select * from transaction_b where b_name=#{BName}")
    public B selectBByName(@Param("BName") String name);

    @Select("select * from transaction_b")
    public List<B> selectBAll();

    @Delete("delete from transaction_b where b_name=#{BName}")
    public boolean deleteBByName(@Param("BName")String name);
}
